#ifndef MOUSESUBJECT_H
#define MOUSESUBJECT_H

#include "d3dUtil.h"
#include "Message.h"
#include "MouseListener.h"
#include "TypeUtil.h"

class MouseSubject
{
public:
	~MouseSubject(void);
	static MouseSubject* Instance();

	virtual void AddMouseListener(MouseListener *listener);
	virtual void DeleteMouseListener(MouseListener *listener);
	virtual void MouseNotify(MouseMsg msg);
	void SetCurrentPoint(int x,int y);
	void UpdateOldPoint();

protected:
	MouseSubject(void);
	MouseSubject(const MouseSubject&);
	MouseSubject& operator=(const MouseSubject&);

private:
	Point							m_ptCurrPoint;
	Point							m_ptOldPoint;
	std::set<MouseListener*>		mouseListeners;
};


#endif

